import request from '@/utils/request'

export const getUsers = (params) => {
  return request({
    url: '/user',
    method: 'get',
    params
  })
}

export const approveUser = (id, status) => {
  return request({
    url: `/user/${id}/approve`,
    method: 'put',
    data: { status }
  })
}

export const updateUserStatus = (id, status) => {
  return request({
    url: `/user/${id}/status`,
    method: 'put',
    data: { status }
  })
}